package com.zzw.java.service;

import com.fazecast.jSerialComm.SerialPort;
import com.zzw.java.utils.ResponseResult;

import java.io.IOException;
import java.util.List;


/**
 * @Author：hcy
 * @Package：com.zzw.java.serial.spring
 * @version：1.0
 * @Date：2025/8/6 14:01
 */

public interface SerialPortService {
    List<SerialPort> discoverSerialPort();

    boolean closeSerialPort(String systemPortName);

    void sendData(String systemPortName, String data) throws IOException;


    ResponseResult<Boolean> openSerialPort(String systemPortName);
}
